package com.yanqu.road.logic.bussiness.tradewar;

import com.yanqu.road.entity.tradewar.CrossTradeWarNotice;
import com.yanqu.road.entity.tradewar.TradeWarActivityJoinUnion;
import com.yanqu.road.entity.tradewar.TradeWarTrackRecord;
import com.yanqu.road.entity.tradewar.TradeWarWanted;
import com.yanqu.road.logic.bussiness.DaoHelper;

import java.util.LinkedList;
import java.util.List;
import java.util.Map;

public class TradeWarActivityBussiness {
    public static Map<Integer,Map<Integer,TradeWarActivityJoinUnion>> getTradeWarActivityJoinUnionMap() {
        return DaoHelper.getTradeWarActivityJoinUnionDaoImpl().getTradeWarActivityJoinUnionMap();
    }

    public static boolean addTradeWarActivityJoinUnion(TradeWarActivityJoinUnion data){
        return DaoHelper.getTradeWarActivityJoinUnionDaoImpl().add(data);
    }

    public static boolean updateTradeWarActivityJoinUnion(TradeWarActivityJoinUnion data){
        return DaoHelper.getTradeWarActivityJoinUnionDaoImpl().update(data);
    }

    public static Map<Integer, LinkedList<CrossTradeWarNotice>> getCrossTradeWarNoticeMap(List<Integer> activityIdList, long selectTime) {
        return DaoHelper.getCrossTradeWarNoticeDaoImpl().getCrossTradeWarNoticeMap(activityIdList, selectTime);
    }

    public static LinkedList<CrossTradeWarNotice> getCrossTradeWarNoticeList(int activityId , long selectTime){
        return DaoHelper.getCrossTradeWarNoticeDaoImpl().getCrossTradeWarNoticeMapByActivityId(activityId,selectTime);
    }

    public static boolean addCrossTradeWarNotice(CrossTradeWarNotice data) {
        return DaoHelper.getCrossTradeWarNoticeDaoImpl().add(data);
    }

    public static Map<String, TradeWarWanted> getTradeWarWantedMap(int activityId) {
        return DaoHelper.getCrossTradeWarWantedDaoImpl().getTradeWarWantedMapByActivityId(activityId);
    }

    public static Map<Integer, Map<String, TradeWarWanted>> getTradeWarWantedMap(List<Integer> activityIdList) {
        return DaoHelper.getCrossTradeWarWantedDaoImpl().getTradeWarWantedMap(activityIdList);
    }

    public static boolean addTradeWarWanted(TradeWarWanted tradeWarWanted) {
        return DaoHelper.getCrossTradeWarWantedDaoImpl().add(tradeWarWanted);
    }

    public static boolean updateTradeWarWanted(TradeWarWanted tradeWarWanted) {
        return DaoHelper.getCrossTradeWarWantedDaoImpl().update(tradeWarWanted);
    }

    public static Map<String, List<TradeWarTrackRecord>> getTradeWarTrackRecordMap(List<Integer> activityIdList) {
        return DaoHelper.getCrossTradeWarTrackRecordDaoImpl().getTradeWarTrackRecordMap(activityIdList);
    }

    public static Map<String, List<TradeWarTrackRecord>> getTradeWarTrackRecordMapByActivityId(int activityId) {
        return DaoHelper.getCrossTradeWarTrackRecordDaoImpl().getTradeWarTrackRecordMap(activityId);
    }

    public static boolean addTradeWarTrackRecord(TradeWarTrackRecord tradeWarTrackRecord) {
        return DaoHelper.getCrossTradeWarTrackRecordDaoImpl().add(tradeWarTrackRecord);
    }

    public static boolean updateTradeWarTrackRecord(TradeWarTrackRecord tradeWarTrackRecord) {
        return DaoHelper.getCrossTradeWarTrackRecordDaoImpl().update(tradeWarTrackRecord);
    }
}
